# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=sshsrv
pkgver=1.0
pkgrel=7
pkgdesc="Connect to SSH servers using DNS SRV records"
url="https://github.com/Crosse/sshsrv"
arch="all"
license="ISC"
makedepends="go"
options="chmod-clean net"
source="$pkgname-$pkgver.tar.gz::https://github.com/Crosse/sshsrv/archive/refs/tags/v$pkgver.tar.gz"

export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"
export GOFLAGS="$GOFLAGS -modcacherw"

build() {
	go build
}

check() {
	# useless since no test are available
	go test
}

package() {
	install -Dm755 sshsrv "$pkgdir"/usr/bin/sshsrv
}

sha512sums="
225dce6d454eced8b2572b2f79ae6c5d0fb8a16f5f0129241805e808ccfffebe5e36d31d44121c14f3632cc2aec1f4f31c1de99cb258586876eb9a30265e5e04  sshsrv-1.0.tar.gz
"
